package com.wcarmon.life.business {

    import com.adobe.cairngorm.business.ServiceLocator;
    import com.adobe.cairngorm.business.IServiceLocator;
    import com.adobe.cairngorm.commands.ICommand
    import com.adobe.cairngorm.control.CairngormEvent;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;
	import mx.rpc.IResponder;
	import flash.utils.*;
	
	
	public class DoImapImportDelegate {
		include "../../includes/loggerSnippet.as";
		
		private var responder : IResponder;
		private var service : Object;
		
		public function DoImapImportDelegate( responder : IResponder ){
			this.service = ServiceLocator.getInstance().getRemoteObject("LifeEmailService");
			this.responder = responder;
			log.info( 'Using this php file: ' + this.service.source );
		}
		public function doImport() : void {
			log.debug('doing an imap import');
			var call : Object = service.doImport();
			call.addResponder( responder );
		}
	}
}